package com.tarena.day030;

import java.util.Scanner;

public class SwitchCaseDemo {
  public static void main(String[] args) {
    Scanner console = new Scanner(System.in);
    System.out.print("输入分数:");
    int score = console.nextInt();
//    String level;
//    switch(score/10){
//    case 10: 
//    case 9: level = "优秀"; break;
//    case 8: level = "良好"; break;
//    case 7: level = "中等"; break;
//    case 6: level = "及格"; break;
//    default: level = "不及格";
//    }
//    System.out.println(level);
    System.out.println(level(score));  
  }
  public static String level(int score){
    String level;
    switch(score/10){
    case 10: 
    case 9: level = "优秀"; break;
    case 8: level = "良好"; break;
    case 7: level = "中等"; break;
    case 6: level = "及格"; break;
    default: level = "不及格";
    }
    return level;
  }

}





